package com.oazon.system.handler;

import android.util.Log;

import com.oazon.moco.link.core.LinkEventController;
import com.oazon.moco.link.core.LinkSDK;
import com.oazon.system.SysActionChannal;
import com.oazon.system.action.ShutDownAction;
import com.oazon.system.core.IActionMessage;
import com.oazon.system.core.IActionhandler;

public class ShutDownHandler implements IActionhandler {
	
	private  boolean isShutDown = false;

	@Override
	public void getIn(IActionMessage actionMessage) {
		Log.i(TAG, "关机");
		isShutDown = true;
		//if(((ShutDownAction) actionMessage).getDelay() <0){
			Log.i(TAG, "notify关机");
			LinkSDK.getInstance().isShutdone(LinkEventController.systemEventSource);
		//}else{
//				LinkSDK.getInstance().setShutdoneOpentime(LinkEventController.systemEventSource, ((ShutDownAction) actionMessage).getDelay());
		//}
	}

	@Override
	public void getOut() {
		SysActionChannal.getInstance().doAction(new ShutDownAction());
	}
	
	@Override
	public long getTimeOut() {
		return 0;
	}

	@Override
	public boolean isPauseTimer() {
		return false;
	}
}
